import response from '@/utils/response';
import { GET_USER_INFO } from '../constants';
/**获取用户信息 */
export const getUserInfo = () => {
  return async (dispatch) => {
    const {
      data: { data },
    } = await response.get('/user/profile');
    dispatch({
      type: GET_USER_INFO,
      payload: data,
    });
  };
};
